package org.ims.inv.service.flow;

import java.util.List;

import org.ims.inv.model.flow.material.ModelFlowMaterial;

import cn.trymore.core.exception.ServiceException;
import cn.trymore.core.service.ServiceGeneric;

/**
 * Service: 工作流材料
 * 
 * @author Jeccy.Zhao
 *
 */
public interface ServiceFlowMaterial
extends ServiceGeneric<ModelFlowMaterial>
{
	/**
	 * Obtains list of root material entities 
	 * 
	 * @return
	 * @throws ServiceException
	 */
	List<ModelFlowMaterial> getAllRootMaterials () throws ServiceException;
	
	/**
	 * Obtains list of materials by root entity
	 * 
	 * @param root
	 * @return
	 * @throws ServiceException
	 */
	List<ModelFlowMaterial> getByRootMaterial (ModelFlowMaterial root) throws ServiceException;
	
	/**
	 * Obtains entity by the specified sequence number
	 * 
	 * @param sequence
	 * @param entity
	 * @return
	 * @throws ServiceException
	 */
	ModelFlowMaterial getBySequence (Integer sequence, ModelFlowMaterial entity) throws ServiceException;
	
}
